In case of FDO notifications, we may receive a notification coming from
non-desktop-applications (e.g. gsd does that), but in any case when
activating an action we should always provide back the activation-token.
So send the startup notification ID in any case, even if the appId is
unset (in fact get_startup_notify_id() uses a nullable parameter for a
reason since GNOME/glib@
6210708f).
In wayland this more than enough, while in X11 we could have used the
gnome-shell desktop file as fallback, but that's gone for good now!
Fixes: bb73bf5
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3891>
_emitActivationToken(source, id) {
const context = global.create_app_launch_context(0, -1);
- const info = source.app?.get_app_info();
- if (info) {
- const token = context.get_startup_notify_id(info, []);
- this._dbusImpl.emit_signal('ActivationToken',
- GLib.Variant.new('(us)', [id, token]));
- }
+ const appInfo = source.app?.get_app_info() ?? null;
+ const token = context.get_startup_notify_id(appInfo, []);
+ this._dbusImpl.emit_signal('ActivationToken',
+ GLib.Variant.new('(us)', [id, token]));
}
}